import {
    createCustomComponent
} from 'vue-amap';
export const CatholicMarker = createCustomComponent({
    name: 'catholic-marker',
    props: ['options','extData'],
    data: () => {
        return {
            marker: null
        }
    },
    contextReady() {},
    init(options) {
        return new Promise((resolve, reject) => {
            this.marker = new AMap.Marker({
                map:options.map,
                extData:this.extData,
                offset: new AMap.Pixel(0, 0),
                anchor: 'center',
                ...this.options
            });
            this.marker.on('click',e=>{
                this.$emit("oneMarkerClick", e);
            })
            resolve(this.marker);
        })
    }
})